package com.scu.gkvr_system_backend.controller;

import com.scu.gkvr_system_backend.service.ScoreRankService;
import com.scu.gkvr_system_backend.utils.Result;
import com.scu.gkvr_system_backend.vo.ScoreLineYearsGetVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @project gkvr_system_backend
 * @description 文理分数线排名相关Controller层
 * @date 2024/5/10 23:30:31
 * @version V1.0
 */
@RestController
@RequestMapping("/scoreRank")
@CrossOrigin
public class GsWenLiScoreRankController {

    @Autowired
    private ScoreRankService scoreRankService;

    @GetMapping("/list")
    public Result getScoreRank(Integer page,String type) {
        Map<String,Object> map = scoreRankService.getScoreRank(page,type);
        return Result.success(map);
    }

    @GetMapping("/getLine")
    public Result getScoreLineYears(String type){
        List<ScoreLineYearsGetVO> list = scoreRankService.getScoreLineYears(type);
        return Result.success(list);
    }
}
